package com.ewayde.base.catchlog.test;

import com.ewayde.base.catchlog.ResponseHandlerI;
import org.springframework.stereotype.Component;

@Component
public class CustomResponseHandler implements ResponseHandlerI {

    @Override
    public Object handle(Class returnType, int errCode, String errMsg) {
        System.out.println("==== This is Customized Response handler");
        Demo.DemoResponse response = new Demo.DemoResponse();
        response.setResultCode(errCode);
        response.setMsg(errMsg);
        return response;
    }
}
